package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.store.awk.bean.ContentItemBean;
import o.azb;
import o.cgz;
import o.epv;
import o.CollectCheck;
import o.ewm.d;
import o.ewm.j;

public class ContentMidItemCard extends BaseDistCard {
    private ImageView ʼ;
    protected TextView ˋ;

    public ContentMidItemCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        azb.ॱ(view, j.ˆ);
        ˏ((ImageView) view.findViewById(j.ʻˊ));
        ॱ((TextView) view.findViewById(j.ʽ));
        ˊ((TextView) view.findViewById(j.ˋ));
        this.ˋ = (TextView) view.findViewById(j.ˊ);
        this.ʼ = (ImageView) view.findViewById(j.ᐧˋ);
        ˋ();
        ʽ(view);
        return this;
    }

    private void ˋ() {
        azb.ʼ(this.ʼ, (azb.ˊ(this.ʼॱ) + epv.ˋ(this.ʼॱ, 68)) + this.ʼॱ.getResources().getDimensionPixelSize(d.ॱˊ));
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        ContentItemBean contentItemBean = (ContentItemBean) cardBean;
        this.ʼ.setVisibility(ˊᐝ() ? 0 : 4);
        if (!CollectCheck.isEmpty(contentItemBean.ˊ())) {
            this.ˋ.setText((CharSequence) contentItemBean.ˊ().get(0));
        }
    }

    public ImageView ˎ() {
        return this.ʼ;
    }
}
